package com.fourth.controller;

import com.fourth.service.UBuserInfoService;
import com.ljx.entity.BusinessInfo;
import com.ljx.entity.UserInfo;
import com.ljx.vo.Result;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


/**
 * @author C-Q
 * @version 1.1.0
 * @Description: 用户信息
 * @date 2023/3/2
 */
@RestController
@RequestMapping("/merchant")
public class UBuserInfoController {


    @Autowired
    private UBuserInfoService ubUserInfoService;

    /**
     * 根据当前用户名查询用户信息
     * @return
     */
    @RequestMapping("/UserOrBusinessAll")
    public Result UserOrBusinessInfo(){
        return ubUserInfoService.UserOrBusinessInfo();
    }

    /**
     * 根据当前用户名修改用户信息
     * @return
     */
    @RequestMapping("/UserUpdate")
    public Result UserUpdate(@RequestBody UserInfo userInfo) {
        System.out.println(userInfo+"!!!!!!!");
        return ubUserInfoService.UserRevise(userInfo);
    }


}
